<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
</head>
<script src="vue.js"></script>


<body>

    <div id="app">
       <!--<hd-input></hd-input>-->
        <!--<hr>-->
        <!--<hd-textarea></hd-textarea>-->
        <div :is="fromType"></div>
        <input type="radio" v-model="fromType"  value="hdInput">文本框
        <input type="radio" v-model="fromType"  value="hdTextarea">文本域
    </div>

<script type="text/x-template" id="bsPanel">
    <ul>
        <!--<li v-for="v in data">{{v.title}}</li>-->
        <!--<slot title="java" na="ew"></slot>-->
        <slot v-for="v in data" :field="v"></slot>
    </ul>

</script>
<script>

    var bsPanel={
        template:'#bsPanel',
        props:['data'],
        data(){
            return{
                
            };

        },
        methods:{
            del(k){
                this.news.splice(k,1);
            }
        }
    };
    var hdInput={
        template:'<div><input/></div>'
    };
    var hdTextarea={
        template:'<div><textarea></textarea></div>'
    };

    var app=new Vue({
        el:'#app',
        components:{
            hdInput, hdTextarea
        },
        data:{
            fromType:"hdInput"


        },



    });

</script>
</body>
</html>